package org.example;

import lombok.extern.slf4j.Slf4j;
import org.example.config.MqttGateway;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@Slf4j
@SpringBootTest
@RunWith(SpringRunner.class)
public class MqttClientTest {
    @Autowired
    private MqttGateway mqttGateway;

    @Test
    public void sendMsg() {
        mqttGateway.sendMsgToMqtt("worker/location", "hello mqtt spring boot");
        log.info("message is send");
    }
}